System and method for determining compression rates for images comprising text

ABSTRACT

A system for determining compression rates for images, the system comprising a processing resource configured to: obtain a given image at least partially comprising a given text; compress the given image at a given compression ratio, giving rise to a compressed image; perform Optical Character Recognition (OCR) on the compressed image, giving rise to OCR text; compare the OCR text to the given text, giving rise to comparison results; upon the comparison results meeting a rule, increase the given compression rate; and upon the compression results not meeting a rule, return to a previous compression rate, if any.

TECHNICAL FIELD

The invention relates to a system and method for determining compressionrates for images.

BACKGROUND

Storage space and bandwidth are two valuable resources in the computingand computer networks industries. Vast and ever-increasing amounts ofdata are transferred over computer networks such as the Internet, andvarious systems are required to store vast amounts of that data forfuture use. In order to improve utilization of such resources, manysolutions have been devised to compress the data, in order for it torequire less storage space and in order to reduce the required bandwidthfor transferring it between machines connected to the computerizednetworks.

Many data compression solutions exist, aimed at improving theutilization of the storage space and bandwidth resources. Some solutionsare focused at compressing visual information (e.g. images and/orvideos), whereas other solutions are focused at compressing textualinformation. In some cases, visual information can comprise also textualinformation, such as in the case of an image (e.g. a screenshot) thatcomprises text (a character, or a sequence of characters). Overcompressing such visual information may lead to the textual informationbeing unreadable. On the other hand, under compressing such information(out of a concern that over compression will render the textualinformation unreadable) leads to a waste of storage space and/orbandwidth resources.

There is thus a need in the art for a new method and system for a systemand method for determining compression rates for images comprising text.

References considered to be relevant as background to the presentlydisclosed subject matter are listed below. Acknowledgement of thereferences herein is not to be inferred as meaning that these are in anyway relevant to the patentability of the presently disclosed subjectmatter.

US Patent Application No. 2018/0157906 (Loginov et al.), published onJun. 7, 2018, discloses a method of analyzing a digital image of adocument (to determine, as example, a document suitability forserver-based OCR processing) in a computer system that includes a userelectronic device (for acquiring or storing a digital image of adocument) connectable to a server (for executing the server-based OCRprocessing of the digital image to create a recognized-text document).The method is executable by the user electronic device and comprises:acquiring the digital image of the document; analyzing an OCR qualityparameter associated with a compressed digital image to be created fromthe digital image using a compression algorithm and a compressionparameter; in response to the OCR quality parameter being above or equalto a pre-determined threshold: transmitting the compressed digital imageto the server. Optionally, the method further comprises compressing thedigital image using the compression algorithm and the compressionparameter to create the compressed digital image before transmissionthereof.

US Patent Application No. 2014/0280517 (White et al.), published on Sep.18, 2014, discloses systems and methods for capturing interaction datarelating to a host application (app) implemented on a mobile device aredisclosed. A tracking module is embedded in the host application.Interaction data relating to the host application is captured on themobile device with the tracking module. The captured interaction data istransmitted from the mobile device.

U.S. Pat. No. 8,997,081 (Manion et al.), published on Mar. 31. 2015,discloses a tag delivery network for delivering tags to collectanalytics related to use of mobile applications. The tag deliverynetwork may include multiple servers for communicating with mobiledevices executing mobile applications. The mobile applications may beany mobile application that has been recompiled with, for example, aparticular line of code and a static library. A recompiled mobileapplication may initiate a browser when executed by a mobile device. Thetag delivery network may deliver a tag container to the browser. The tagcontainer may load a bootstrap file which in turn may load one or morerule files and code files. These files may cause the mobile device tomodify an appearance of the mobile application. The modification may beperformed to carry out multivariate testing (e.g., A/B testing), contentswapping, optimization of the mobile application, or personalization ofthe mobile application.

GENERAL DESCRIPTION

In accordance with a first aspect of the presently disclosed subjectmatter, there is provided a system for determining compression rates forimages, the system comprising a processing resource configured to:provide for each screen of one or more screens of an application: (a)text displayed on the respective screen, (b) a compression ratioassociated with the respective screen, if any, and (c) a compressionratio determination status associated with the respective screen;receive, from a given device executing the application, a compressedscreenshot of a given screen of the screens of the application,compressed in accordance with the compression ratio associated with thegiven screen, or, upon no compression ratio being associated with thegiven screen, in accordance with a default compression ratio: and uponthe provided compression ratio determination status of the given screenbeing indicative of a non-final compression ratio, perform thefollowing: perform Optical Character Recognition (OCR), using OCRsoftware, on the compressed screenshot, giving rise to OCR text;determine an accuracy score by comparing the OCR text to the textprovided for the given screen; upon the accuracy score being below athreshold, set the compression ratio determination status of the givenscreen to be indicative of a final compression ratio; and upon theaccuracy score being equal to or above a threshold, increase thecompression ratio.

In some cases, the processing resource is further configured to performthe following, before receiving the compressed screenshot: receive, fromthe given device, a request to obtain the compression ratio of the givenscreen; send, to the given device, the compression ratio associated withthe given screen, or, upon no compression ratio being associated withthe given screen, one of: (a) the default compression ratio or (b) anindication that no compression ratio is associated with the givenscreen.

In some cases, the application is a mobile application and wherein thegiven device is a mobile device.

In some cases, the default compression rate is determined by theprocessing resource, or by a second processing resource of the givendevice, based on one or more parameters that affects a layout of thegiven screen.

In some cases, the parameters include one, or more, of the followinggroup: (a) a density of a display of the given device on which the givenscreen is displayed, (b) a resolution of the display of the givendevice, (c) an average text size on the display of the given device, (d)an operating system of the given device, or (e) a make and model of thegiven device.

In some cases, the compressed screenshot is compressed using JPEGcompression.

In some cases, the compression ratio is based on: a scale of the JPEGcompression and a quality of the JPEG compression.

In some cases, the processing resource is further configured to storethe compressed screenshot in a data repository.

In some cases, the processing resource is further configured to:retrieve the compressed screenshot from the data repository; and displaythe compressed screenshot to a user of the system.

In some cases, the accuracy score is highest upon the OCR text and thetext provided for the given screen entirely matching.

In some cases, the threshold is the accuracy score that is highest.

In accordance with a second aspect of the presently disclosed subjectmatter, there is provided a system for determining compression rates forimages, the system comprising a processing resource configured to:obtain a given image at least partially comprising a given text;compress the given image at a given compression ratio, giving rise to acompressed image; perform Optical Character Recognition (OCR) on thecompressed image, giving rise to OCR text; compare the OCR text to thegiven text, giving rise to comparison results; upon the comparisonresults meeting a rule, increase the given compression rate; and uponthe compression results not meeting a rule, return to a previouscompression rate, if any.

In accordance with a third aspect of the presently disclosed subjectmatter, there is provided a method for determining compression rates forimages, the method comprising: providing, by a processing resource, foreach screen of one or more screens of an application: (a) text displayedon the respective screen, (b) a compression ratio associated with therespective screen, if any, and (c) a compression ratio determinationstatus associated with the respective screen; receiving, by theprocessing resource, from a given device executing the application, acompressed screenshot of a given screen of the screens of theapplication, compressed in accordance with the compression ratioassociated with the given screen, or, upon no compression ratio beingassociated with the given screen, in accordance with a defaultcompression ratio; and upon the provided compression ratio determinationstatus of the given screen being indicative of a non-final compressionratio, performing the following by the processing resource: performOptical Character Recognition (OCR), using OCR software, on thecompressed screenshot, giving rise to OCR text; determine an accuracyscore by comparing the OCR text to the text provided for the givenscreen; upon the accuracy score being below a threshold, set thecompression ratio determination status of the given screen to beindicative of a final compression ratio; and upon the accuracy scorebeing equal to or above a threshold, increase the compression ratio.

In some cases, the method further comprises performing the following bythe processing resource, before receiving the compressed screenshot:receive, from the given device, a request to obtain the compressionratio of the given screen; send, to the given device, the compressionratio associated with the given screen, or, upon no compression ratiobeing associated with the given screen, one of: (a) the defaultcompression ratio or (b) an indication that no compression ratio isassociated with the given screen.

In some cases, the application is a mobile application and wherein thegiven device is a mobile device.

In some cases, the default compression rate is determined by theprocessing resource, or by a second processing resource of the givendevice, based on one or more parameters that affects a layout of thegiven screen.

In some cases, the parameters include one, or more, of the followinggroup: (a) a density of a display of the given device on which the givenscreen is displayed, (b) a resolution of the display of the givendevice, (c) an average text size on the display of the given device, (d)an operating system of the given device, or (e) a make and model of thegiven device.

In some cases, the compressed screenshot is compressed using JPEGcompression.

In some cases, the compression ratio is based on: a scale of the JPEGcompression and a quality of the PEG compression.

In some cases, the method further comprises storing the compressedscreenshot in a data repository.

In some cases, the method further comprises: retrieving the compressedscreenshot from the data repository; and displaying the compressedscreenshot to a user.

In some cases, the accuracy score is highest upon the OCR text and thetext provided for the given screen entirely matching.

In some cases, the threshold is the accuracy score that is highest.

In accordance with a fourth aspect of the presently disclosed subjectmatter, there is provided a method for determining compression rates forimages, the method comprising: obtaining, by a processing resource, agiven image at least partially comprising a given text; compressing, bythe processing resource, the given image at a given compression ratio,giving rise to a compressed image; performing, by the processingresource, Optical Character Recognition (OCR) on the compressed image,giving rise to OCR text; comparing, by the processing resource, the OCRtext to the given text, giving rise to comparison results; upon thecomparison results meeting a rule, increasing, by the processingresource, the given compression rate; and upon the compression resultsnot meeting a rule, returning, by the processing resource, to a previouscompression rate, if any.

In accordance with a fifth aspect of the presently disclosed subjectmatter, there is provided a non-transitory computer readable storagemedium having computer readable program code embodied therewith, thecomputer readable program code, executable by at least one processingresource of a computer to perform a method comprising: obtaining, by theprocessing resource, a given image at least partially comprising a giventext; compressing, by the processing resource, the given image at agiven compression ratio, giving rise to a compressed image; performing,by the processing resource, Optical Character Recognition (OCR) on thecompressed image, giving rise to OCR text; comparing, by the processingresource, the OCR text to the given text, giving rise to comparisonresults; upon the comparison results meeting a rule, increasing, by theprocessing resource, the given compression rate; and upon thecompression results not meeting a rule, returning, by the processingresource, to a previous compression rate, if any.

In accordance with a sixth aspect of the presently disclosed subjectmatter, there is provided a non-transitory computer readable storagemedium having computer readable program code embodied therewith, thecomputer readable program code, executable by at least one processingresource of a computer to perform a method comprising: providing, by aprocessing resource, for each screen of one or more screens of anapplication: (a) text displayed on the respective screen, (b) acompression ratio associated with the respective screen, if any, and (c)a compression ratio determination status associated with the respectivescreen; receiving, by the processing resource, from a given deviceexecuting the application, a compressed screenshot of a given screen ofthe screens of the application, compressed in accordance with thecompression ratio associated with the given screen, or, upon nocompression ratio being associated with the given screen, in accordancewith a default compression ratio; and upon the provided compressionratio determination status of the given screen being indicative of anon-final compression ratio, performing the following by the processingresource: perform Optical Character Recognition (OCR), using OCRsoftware, on the compressed screenshot, giving rise to OCR text;determine an accuracy score by comparing the OCR text to the textprovided for the given screen; upon the accuracy score being below athreshold, set the compression ratio determination status of the givenscreen to be indicative of a final compression ratio; and upon theaccuracy score being equal to or above a threshold, increase thecompression ratio.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to understand the presently disclosed subject matter and to seehow it may be carried out in practice, the subject matter will now bedescribed, by way of non-limiting examples only, with reference to theaccompanying drawings, in which:

FIG. 1 is a block diagram schematically illustrating one example of asystem for determining compression rates for images comprising texts, inaccordance with the presently disclosed subject matter;

FIG. 2 is a flowchart illustrating one example of a sequence ofoperations carried out for determining compression rates for imagescomprising texts, in accordance with the presently disclosed subjectmatter;

FIG. 3 is a flowchart illustrating a more specific example of a sequenceof operations carried out by a server for determining compression ratesfor screenshots of screens of an application in a client-serverarchitecture, in accordance with the presently disclosed subject matter;

FIG. 4 is a flowchart illustrating one example of a sequence ofoperations carried out by a server for providing a client with acompression ratio of a given screen of an application in a client-serverarchitecture, in accordance with the presently disclosed subject matter;and

FIG. 5 is a flowchart illustrating one example of a sequence ofoperations carried out by a client for providing a server with acompressed screenshot in a client-server architecture, in accordancewith the presently disclosed subject matter.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are setforth in order to provide a thorough understanding of the presentlydisclosed subject matter. However, it will be understood by thoseskilled in the art that the presently disclosed subject matter may bepracticed without these specific details. In other instances, well-knownmethods, procedures, and components have not been described in detail soas not to obscure the presently disclosed subject matter.

In the drawings and descriptions set forth, identical reference numeralsindicate those components that are common to different embodiments orconfigurations.

Unless specifically stated otherwise, as apparent from the followingdiscussions, it is appreciated that throughout the specificationdiscussions utilizing terms such as “providing”, “receiving”,“performing”, “determining”, “setting”, “increasing”, “sending”,“storing”, “retrieving”, “displaying”, “compressing” or the like,include action and/or processes of a computer that manipulate and/ortransform data into other data, said data represented as physicalquantities, e.g. such as electronic quantities, and/or said datarepresenting the physical objects. The terms “computer”, “processor”,and “controller” should be expansively construed to cover any kind ofelectronic device with data processing capabilities, including, by wayof non-limiting example, a personal desktop/laptop computer, a server, acomputing system, a communication device, a smartphone, a tabletcomputer, a smart television, a processor (e.g. digital signal processor(DSP), a microcontroller, a field programmable gate array (FPGA), anapplication specific integrated circuit (ASIC), etc.), a group ofmultiple physical machines sharing performance of various tasks, virtualservers co-residing on a single physical machine, any other electroniccomputing device, and/or any combination thereof.

The operations in accordance with the teachings herein may be performedby a computer specially constructed for the desired purposes or by ageneral-purpose computer specially configured for the desired purpose bya computer program stored in a non-transitory computer readable storagemedium. The term “non-transitory” is used herein to exclude transitory,propagating signals, but to otherwise include any volatile ornon-volatile computer memory technology suitable to the application.

As used herein, the phrase “for example,” “such as”, “for instance” andvariants thereof describe non-limiting embodiments of the presentlydisclosed subject matter. Reference in the specification to “one case”,“some cases”, “other cases” or variants thereof means that a particularfeature, structure or characteristic described in connection with theembodiment(s) is included in at least one embodiment of the presentlydisclosed subject matter. Thus, the appearance of the phrase “one case”,“some cases”, “other cases” or variants thereof does not necessarilyrefer to the same embodiment(s).

It is appreciated that, unless specifically stated otherwise, certainfeatures of the presently disclosed subject matter, which are, forclarity, described in the context of separate embodiments, may also beprovided in combination in a single embodiment. Conversely, variousfeatures of the presently disclosed subject matte, which are, forbrevity, described in the context of a single embodiment, may also beprovided separately or in any suitable sub-combination.

In embodiments of the presently disclosed subject matter, fewer, moreand/or different stages than those shown in FIGS. 2-5 may be executed.In embodiments of the presently disclosed subject matter one or morestages illustrated in FIGS. 2-5 may be executed in a different orderand/or one or more groups of stages may be executed simultaneously. FIG.1 illustrates a general schematic of the system architecture inaccordance with an embodiment of the presently disclosed subject matter.Each module in FIG. 1 can be made up of any combination of software,hardware and/or firmware that performs the functions as defined andexplained herein. The modules in FIG. 1 may be centralized in onelocation or dispersed over more than one location. In other embodimentsof the presently disclosed subject matter, the system may comprisefewer, more, and/or different modules than those shown in FIG. 1.

Any reference in the specification to a method should be applied mutatismutandis to a system capable of executing the method and should beapplied mutatis mutandis to a non-transitory computer readable mediumthat stores instructions that once executed by a computer result in theexecution of the method.

Any reference in the specification to a system should be applied mutatismutandis to a method that may be executed by the system and should beapplied mutatis mutandis to a non-transitory computer readable mediumthat stores instructions that may be executed by the system.

Any reference in the specification to a non-transitory computer readablemedium should be applied mutatis mutandis to a system capable ofexecuting the instructions stored in the non-transitory computerreadable medium and should be applied mutatis mutandis to method thatmay be executed by a computer that reads the instructions stored in thenon-transitory computer readable medium.

Bearing this in mind, attention is drawn to FIG. 1, a block diagramschematically illustrating one example of a system for determiningcompression rates for images comprising texts, in accordance with thepresently disclosed subject matter.

In accordance with the presently disclosed subject matter, the system100 can include a server 120. Server 120 comprises a processing resource160. Processing resource 160 can be one or more processing units (e.g.central processing units), microprocessors, microcontrollers (e.g.microcontroller units (MCUs)) or any other computing devices or modules,including multiple and/or parallel and/or distributed processing units,which are adapted to independently or cooperatively process data forcontrolling relevant server 120 resources and for enabling operationsrelated to server 120 resources.

The processing resource 160 comprises an Optical Character Recognition(OCR) module 150 and a compression rate determination module 155.

OCR module 150 is configured to perform OCR (e.g. using known methodsand/or techniques) on an image comprising text, in order to identify thetext comprised within an image analyzed thereby. It is to be noted thatwhen reference is made throughout the detailed description to a textthat appears within an image, the text is a character, or a sequence ofcharacters, also referred to as “a string” in computer science, or aplurality of strings located anywhere within the image.

Compression rate determination module 155 is configured to determine acompression ratio for a given image, utilizing the OCR module 150, asfurther detailed herein, inter alia with reference to FIGS. 2-4.

Server 120 further comprises a data repository 130 (e.g. a database, astorage system, a memory including Read Only Memory—ROM, Random AccessMemory—RAM, or any other type of memory, etc.) configured to store data,including, inter alia, images texts table 145 and a compression ratestable 140.

The images texts table 145 can include, for each image of one or moreimages, the texts displayed thereon. For example, assuming that a givenimage displays the text “hello world”, the images texts table 145 caninclude an identifier of the given image that enables uniqueidentification thereof, and the string “hello world” associatedtherewith. In other words, images texts table 145 includes one or moreidentifiers of respective images, and strings that represent textcomprised within each respective image.

The compression rates table 140 can include, for each image of one ormore images, a compression ratio (if previously determined for suchimage, or if a default compression ratio exists for such image), andoptionally a compression ratio determination status, indicative ofwhether the compression ratio associated with each image is a finalcompression ratio, or not. The compression ratios within the compressionrates table 140 can be updated, e.g. in accordance with the processdisclosed with respect to FIGS. 2 and/or 3.

Server 120 further comprises a network interface 165 enabling connectingthe server 120 to one or more user devices 110, via a communicationnetwork such as the Internet, and enabling it to send and receive datasent thereto through the communication network, including sendingcompression rates to the user devices 110 and/or receiving images(whether in a compressed format or not) from the user devices 110 fordetermining a compression rate for the images and/or for recordationthereof, as detailed herein, inter alia with reference to FIGS. 2-5.

System 100 can further comprise one or more user devices 110. Userdevices 110 can be any type of computerized device, including desktopcomputers, laptop computers, tablets, smartphones, smart televisions, orany other device with data processing capabilities.

User device 110 comprises a network interface 170 enabling connectingthe user device 110 to the server 120, via a communication network suchas the Internet, and enabling it to send and receive data sent theretothrough the communication network, including sending images (compressedor not) to the server 120 and/or receiving compression rates from theserver 120 according to which images are compressed thereby, as detailedherein, inter alia with reference to FIG. 5.

User device 110 further comprises a processing resource 180. Processingresource 180 can be one or more processing units (e.g. centralprocessing units), microprocessors, microcontrollers (e.g.microcontroller units (MCUs)) or any other computing devices or modules,including multiple and/or parallel and/or distributed processing units,which are adapted to independently or cooperatively process data forcontrolling relevant user device 110 resources and for enablingoperations related to user device 110 resources.

The processing resource 180 comprises a compression module 190.Compression module 190 is configured to send images to the server 120,whether in a compressed format, or raw images, as further detailedherein, inter alia with reference to FIG. 5.

In some cases, the system 100 can be configured to record sessionsconducted by users of the user devices 110. In such cases, the recordedsessions can be stored on the data repository 130, and they can beretrieved therefrom for viewing. The recorded sessions can be comprisedof a plurality of images, each being a screenshot captured by a deviceon which the respective session is conducted.

Although FIG. 1 refers to a client-server architecture, the presentlydisclosed subject matter is not limited to such client-serverarchitecture, and it can be performed by a standalone device (e.g. userdevice 110 or server 120) capturing images and compressing them whiledetermining a compression ratio utilizing OCR, as detailed herein withrespect to FIG. 2.

Attention is drawn to FIG. 2, a flowchart illustrating one example of asequence of operations carried out for determining compression rates forimages comprising texts, in accordance with the presently disclosedsubject matter.

According to certain examples of the presently disclosed subject matter,server 120 can be configured to perform a compression rate determinationprocess 200, e.g. utilizing compression rate determination module 155.

For this purpose, server 120 is configured to obtain a given image, atleast partially comprising a given text (block 210). The image can be adigital representation of a photograph, a computer-generated image, orany other digital representation of a two-dimensional image (whethercapturing a real-world scene/object, or a computer-generatedscene/object). The obtained given image can be a raw image, that has notbeen compressed, or an image that has already been compressed to someextent.

The server 120 compresses the given image at a given compression ratio,giving rise to a compressed image (block 220). The given compressionratio can be retrieved from the compression rates table 140. Thecompressed image is of smaller size relative to the given image obtainedat block 210 (i.e. it captures less storage space on a computerizedmemory on which it, is stored).

The server 120 performs OCR (e.g. utilizing the OCR module 150) on thecompressed image generated at block 220, giving rise to OCR text (block230). The server 120 then compares the OCR text with the given textcomprised within the given image (block 240). It is to be noted that forthe purpose of the presently disclosed subject matter, it is assumedthat the given text comprised within the given image obtained at block210 is a known text that is accessible by the server 120.

A check is then made, whether a rule is met (block 250). In some cases,the rule can require a complete success of the OCR, so that the OCR textis identical to the given text within the given image. In other cases, athreshold degree of similarity level is determined, and in such cases,the rule can be met when the degree of similarity between the OCR textand the given text within the given image exceeds the threshold.

For example, assuming that the given text within the given image is“Good morning Sir”, and that the OCR text being the result of the OCRprocess performed on the given image is also “Good morning Sir”, the OCRtext and the given text are identical, and the compression did notresult in any mismatch between the given text and the OCR text. Assumingthat the OCR text being the result of the OCR process performed on thegiven image is “God normng Sr”, the degree of similarity between the OCRtext and the given text is clearly not perfect similarity, due to thefact that they differ from one another. In this example, there is adifference in a certain number of characters between the OCR text andthe given text, a difference that can be enumerated, and based on whicha degree of similarity can be determined. It is to be noted thatalthough reference in this example is to a single sentence, in somecases the text can be comprised of a plurality of sentences. In suchcases, various parts of the text can be analyzed independently (e.g. inan iterative process where each part is analyzed in a correspondingiteration), or they can all be regarded as “the text” and analyzedtogether.

One example of a method for determining a degree of similarity betweenthe OCR text and the given text is by comparing a number of charactersof the OCR text that are identical to respective characters of the giventext. It is to be noted however, that other methods can be used todetermine a degree of similarity between the OCR text and the giventext.

It is to be noted that in some cases the OCR can fail (e.g. due to poorimage quality which renders the characters therein unreadable) andreturn an error code. In such cases, the rule is not met.

Upon the rule being met, the server 120 can increase the givencompression ratio (block 260), and repeat blocks 220-260, until the ruleis not met. When the rule is not met, the server can return to theprevious compression rate (block 270), being the compression rate usedin a previous iteration of the compression rate determination process200, and the process ends (block 280).

Although not shown in the figure, it is to be noted that if there is noprevious iteration (i.e. the rule was not met already in a first run ofthe compression rate determination process 200), the server can decreasethe compression ratio, if possible, and repeat blocks 220-260 until therule is not met.

As a result of the process, a desired compression rate that meets therule of block 250 is identified.

It is to be noted that although reference is made in the context of thecompression rate determination process 200 to the server 200, thecompression rate determination process 200 can be performed by any othercomputerized device having data processing capabilities, mutatismutandis.

It is to be noted that, with reference to FIG. 2, some of the blocks canbe integrated into a consolidated block or can be broken down to a fewblocks and/or other blocks may be added. It is to be further noted thatsome of the blocks are optional. It should be also noted that whilst theflow diagram is described also with reference to the system elementsthat realizes them, this is by no means binding, and the blocks can beperformed by elements other than those described herein.

FIG. 3 is a flowchart illustrating a more specific example of a sequenceof operations carried out by a server for determining compression ratesfor screenshots of screens of an application in a client-serverarchitecture, in accordance with the presently disclosed subject matter.

As indicated herein, in some cases there is a need in determiningcompression rates for screenshots, e.g. when recording sessionsconducted by a plurality of user devices 110. The sessions can be, forexample, sessions of the user devices 110 interacting with a givenservice provider via a dedicated application. As a more specificexample, the sessions can be sessions conducted by users of the userdevices via a mobile application of a certain bank. In such cases, thereis a need in the user devices 110 capturing screenshots of screens ofthe application, and sending such screenshots for recordation by theserver 120. It is desirable that the screenshots (that are digitalimages of the screen presently viewed by the user of the mobile device110) will be compressed in a manner that will not affect the ability ofa user that wishes to replay the session to understand the textsdisplayed on the screenshot.

Therefore, according to certain examples of the presently disclosedsubject matter, server 120 can be configured to perform a screenshotcompression rate determination process 300, e.g. utilizing compressionrate determination module 155.

For this purpose, server 120 is configured to provide, for each screenof one or more screens of an application: (a) text displayed on therespective screen (e.g. stored within the images texts table 145), and(b) a compression ratio associated with the respective screen (e.g.stored within compression rates table 140), if any, and (c) acompression ratio determination status associated with the respectivescreen (e.g. also stored within compression rates table 140) (block310). It is to be noted that the term provide in this context means makeavailable in any manner, whether locally (e.g. on a local datarepository such as data repository 130), or remotely (e.g. via a networkconnection to an external device on which such data is stored in amanner that enables retrieval of the data, or parts thereof), as long asthose parts of the data referred to at block 310 that are required forperforming the screenshot compression rate determination process 300 asdetailed herein are available.

Accordingly, for each of the screens of the application, (a) the textdisplayed thereon is provided, (b) a compression ratio is provided ifpreviously determined (whether it was determined in accordance with adefault value, or manually, or in accordance with the screenshotcompression rate determination process 300 detailed herein, or in anyother method), and (c) a compression rate determination statusindicative of whether the compression ratio associated with therespective screen is final, or not.

Server 120 received, receive, from a given device (e.g. user device 110)executing the application, a compressed screenshot of a given screen ofthe screens of the application, compressed in accordance with thecompression ratio associated with the given screen, or, upon nocompression ratio being associated with the given screen, in accordancewith a default compression ratio (block 320).

Attention is drawn, in the context of block 320, to FIG. 4, a flowchartillustrating one example of a sequence of operations carried out by aserver for providing a client with a compression ratio of a given screenof an application in a client-server architecture, in accordance withthe presently disclosed subject matter.

According to certain examples of the presently disclosed subject matter,server 120 can be configured to perform a compression ratio provisioningprocess 400, to provide a user device with a compression ratio accordingto which a screenshot of the given screen (the screen whose compressedscreenshot is to be later received by the server 120 at block 320) is tobe compressed. The compression ratio provisioning process 400 can beperformed e.g. utilizing compression rate determination module 155.

For this purpose, server 120 is configured to receive, from the givendevice (e.g. the user device 110 from which the compressed screenshot isreceived), a request to obtain the compression ratio of the given screen(block 410). The determination of the compression ratio associated withthe given screen can be made using the data provided at block 310, e.g.by retrieving the compression ratio of the given screen using arespective screen identifier.

Server 120 is further configured to send, to the given device, thecompression ratio associated with the given screen (e.g. followingretrieval thereof form the compression rates table 140), or, upon nocompression ratio being associated with the given screen, one of: (a)the default compression ratio or (b) an indication that no compressionratio is associated with the given screen (block 420).

The operation of the user device 110 which communicates with the server120 in respect to the compression ratio provisioning process 400 isdescribed herein, with reference to FIG. 5.

It is to be noted that, with reference to FIG. 4, some of the blocks canbe integrated into a consolidated block or can be broken down to a fewblocks and/or other blocks may be added. It should be also noted thatwhilst the flow diagram is described also with reference to the systemelements that realizes them, this is by no means binding, and the blockscan be performed by elements other than those described herein.

Returning to FIG. 3, server 120 is further configured to check if thecompression ratio determination status of the given screen, provided atblock 310, is indicative of a final compression ratio being determinedfor the given screen (block 330). If the compression ratio determinationstatus is indeed indicative that the compression ratio associated withthe given screen is its final compression ratio, the screenshotcompression rate determination process 300 ends.

However, if the compression ratio determination status is not indicativethat the compression ratio associated with the given screen is its finalcompression ratio, the server 120 is configured to perform OpticalCharacter Recognition (OCR), using OCR software, on the compressedscreenshot, giving rise to OCR text (block 350). The server 120determines an accuracy score, based on a comparison of the OCR text(determined at block 350) and the text associated with the given screen(as provided at block 310) (block 360). It is to be noted that althoughreference in this example is to the text as a whole, in some cases thetext can be comprised of a plurality of portions. In such cases, variousparts of the text can be analyzed independently (e.g. in an iterativeprocess where each part is analyzed in a corresponding iteration), orthey can all be regarded as “the text” and analyzed together.

In some cases, the accuracy score can be a binary score—e.g. one forfull match between the OCR text and the text associated with the givenscreen, and zero if any mismatch exists between the OCR text and thetext associated with the given screen (or if the OCR failed and returnedan error code). In other cases, the accuracy score can be determined inaccordance with a degree of similarity between the OCR text and the textassociated with the given screen (which can be determined, for example,in accordance with the teachings made with reference to block 250 ofFIG. 2).

The server 120 then checks if the accuracy score is below a threshold(block 370). If it is not below the threshold, server increases thecompression ratio associated with the Oven screen to be used insubsequent iterations of the screenshot compression rate determinationprocess 300, e.g. by updating its value in the compression rates table140 (block 390). However, if the compression ratio is below thethreshold, the server sets the compression ratio determination status ofthe given screen to be indicative of a final compression ratio, e.g. byupdating the compression ratio determination status of the given screenwithin the compression rates table 140 (block 380).

It is to be noted that in addition to performing the screenshotcompression rate determination process 300, the received compressedscreenshot (received at block 320) is stored in the data repository 130for future retrieval, e.g. when a user of the system 100 requests toreplay a session conducted by a user of a respective user device 110.

It is to be noted that, with reference to FIG. 3, some of the blocks canbe integrated into a consolidated block or can be broken down to a fewblocks and/or other blocks may be added. Furthermore, in some cases, theblocks can be performed in a different order than described herein (forexample, block 320 can be performed before block 310). It should be alsonoted that whilst the flow diagram is described also with reference tothe system elements that realizes them, this is by no means binding, andthe blocks can be performed by elements other than those describedherein.

Finally, attention is drawn to FIG. 5, a flowchart illustrating oneexample of a sequence of operations carried out by a client forproviding a server with a compressed screenshot in a client-serverarchitecture, in accordance with the presently disclosed subject matter.

According to certain examples of the presently disclosed subject matter,server 120 can be configured to perform a compression ratio obtainmentprocess 500, to obtain, from the server 120, a compression ratioaccording to which a screenshot of the given screen (the screen whosecompressed screenshot is to be later received by the server 120 at block320) is to be compressed. The compression ratio obtainment process 500can be performed e.g. utilizing compression module 190. It is to benoted that the compression ratio obtainment process 500 performed by theuser device 110 corresponds to the compression ratio provisioningprocess 400 performed by the server 120, as detailed herein.

For this purpose, user device 110 is configured to send, to the server120, a request to obtain the compression ratio of a given screen so thatthe user device 110 can compress a screenshot of the given screenaccordingly (block 510). The request is received by the server at block410.

User device 110 receives from the server, in response to the request,the compression ratio associated with the given screen, or, upon nocompression ratio being associated with the given screen, one of (a) thedefault compression ratio (if there is a default compression ratio) or(b) an indication that no compression ratio is associated with the givenscreen. The server sends the requested information at block 420. Userdevice 110 checks if a compression ratio was received (block 530). If itwasn't received (e.g. in case no compression ratio is associated withthe given screen), the user device 110 determines a compression ratio(block 540). If a compression ratio was received, or followingdetermination of the compression ratio of block 540, user device 110compresses a screenshot of the given screen captured thereby, givingrise to a compressed screenshot (block 550) and sends the compressedscreenshot to the server (block 560), which receives it on block 320.

It is to be noted that, with reference to FIG. 5, some of the blocks canbe integrated into a consolidated block or can be broken down to a fewblocks and/or other blocks may be added. It should be also noted thatwhilst the flow diagram is described also with reference to the systemelements that realizes them, this is by no means binding, and the blockscan be performed by elements other than those described herein.

It is to be noted that FIGS. 3-5 refer to a scenario of sessionrecording that is performed between a user device 110 and a server 120.In this scenario the images that are compressed are screenshots ofscreens displayed on the user devices during sessions conducted via anapplication installed on the user devices 110. However, the teachingsherein are not limited to such a client/server architecture, and theprocess can also be performed on a standalone device, as detailed, forexample, with reference to FIG. 2.

It is to be understood that the presently disclosed subject matter isnot limited in its application to the details set forth in thedescription contained herein or illustrated in the drawings. Thepresently disclosed subject matter is capable of other embodiments andof being practiced and carried out in various ways. Hence, it is to beunderstood that the phraseology and terminology employed herein are forthe purpose of description and should not be regarded as limiting. Assuch, those skilled in the art will appreciate that the conception uponwhich this disclosure is based may readily be utilized as a basis fordesigning other structures, methods, and systems for carrying out theseveral purposes of the present presently disclosed subject matter.

It will also be understood that the system according to the presentlydisclosed subject matter can be implemented, at least partly, as asuitably programmed computer. Likewise, the presently disclosed subjectmatter contemplates a computer program being readable by a computer forexecuting the disclosed method. The presently disclosed subject matterfurther contemplates a machine-readable memory tangibly embodying aprogram of instructions executable by the machine for executing thedisclosed method.

1. A system for determining compression rates for images, the systemcomprising a processing resource configured to: provide for each screenof one or more screens of an application: (a) text displayed on therespective screen, (b) a compression ratio associated with therespective screen, if any, and (c) a compression ratio determinationstatus associated with the respective screen; receive, from a givendevice executing the application, a compressed screenshot of a givenscreen of the screens of the application, compressed in accordance withthe compression ratio associated with the given screen, or, upon nocompression ratio being associated with the given screen, in accordancewith a default compression ratio; and upon the provided compressionratio determination status of the given screen being indicative of anon-final compression ratio, perform the following: perform OpticalCharacter Recognition (OCR), using OCR software, on the compressedscreenshot, giving rise to OCR text; determine an accuracy score bycomparing the OCR text to the text provided for the given screen; uponthe accuracy score being below a threshold, set the compression ratiodetermination status of the given screen to be indicative of a finalcompression ratio; and upon the accuracy score being equal to or above athreshold, increase the compression ratio.
 2. The system of claim 1,wherein the processing resource is further configured to perform thefollowing, before receiving the compressed screenshot: receive, from thegiven device, a request to obtain the compression ratio of the givenscreen; send, to the given device, the compression ratio associated withthe given screen, or, upon no compression ratio being associated withthe given screen, one of: (a) the default compression ratio or (b) anindication that no compression ratio is associated with the givenscreen.
 3. The system of claim 1, wherein the application is a mobileapplication and wherein the given device is a mobile device.
 4. Thesystem of claim 1, wherein the default compression rate is determined bythe processing resource, or by a second processing resource of the givendevice, based on one or more parameters that affects a layout of thegiven screen.
 5. The system of claim 4, wherein the parameters includeone, or more, of the following group: (a) a density of a display of thegiven device on which the given screen is displayed, (b) a resolution ofthe display of the given device, (c) an average text size on the displayof the given device, (d) an operating system of the given device, or (e)a make and model of the given device.
 6. The system of claim 1, whereinthe compressed screenshot is compressed using JPEG compression, andwherein the compression ratio is based on: a scale of the JPEGcompression and a quality of the JPEG compression.
 7. The system ofclaim 1, wherein the processing resource is further configured to: storethe compressed screenshot in a data repository; retrieve the compressedscreenshot from the data repository; and display the compressedscreenshot to a user of the system.
 8. The system of claim 1, whereinthe accuracy score is highest upon the OCR text and the text providedfor the given screen entirely matching.
 9. A system for determiningcompression rates for images, the system comprising a processingresource configured to: obtain a given image at least partiallycomprising a given text; compress the given image at a given compressionratio, giving rise to a compressed image; perform Optical CharacterRecognition (OCR) on the compressed image, giving rise to OCR text;compare the OCR text to the given text, giving rise to comparisonresults; upon the comparison results meeting a rule, increase the givencompression rate; and upon the compression results not meeting a rule,return to a previous compression rate, if any.
 10. A method fordetermining compression rates for images, the method comprising:providing, by a processing resource, for each screen of one or morescreens of an application: (a) text displayed on the respective screen,(b) a compression ratio associated with the respective screen, if any,and (c) a compression ratio determination status associated with therespective screen; receiving, by the processing resource, from a givendevice executing the application, a compressed screenshot of a givenscreen of the screens of the application, compressed in accordance withthe compression ratio associated with the given screen, or, upon nocompression ratio being associated with the given screen, in accordancewith a default compression ratio; and upon the provided compressionratio determination status of the given screen being indicative of anon-final compression ratio, performing the following by the processingresource: perform Optical Character Recognition (OCR), using OCRsoftware, on the compressed screenshot, giving rise to OCR text;determine an accuracy score by comparing the OCR text to the textprovided for the given screen; upon the accuracy score being below athreshold, set the compression ratio determination status of the givenscreen to be indicative of a final compression ratio; and upon theaccuracy score being equal to or above a threshold, increase thecompression ratio.
 11. The method of claim 10, further comprisingperforming the following by the processing resource, before receivingthe compressed screenshot: receive, from the given device, a request toobtain the compression ratio of the given screen; send, to the givendevice, the compression ratio associated with the given screen, or, uponno compression ratio being associated with the given screen, one of: (a)the default compression ratio or (b) an indication that no compressionratio is associated with the given screen.
 12. The method of claim 10,wherein the application is a mobile application and wherein the givendevice is a mobile device.
 13. The method of claim 10, wherein thedefault compression rate is determined by the processing resource, or bya second processing resource of the given device, based on one or moreparameters that affects a layout of the given screen.
 14. The method ofclaim 13, wherein the parameters include one, or more, of the followinggroup: (a) a density of a display of the given device on which the givenscreen is displayed, (b) a resolution of the display of the givendevice, (c) an average text size on the display of the given device, (d)an operating system of the given device, or (e) a make and model of thegiven device.
 15. The method of claim 10, wherein the compressedscreenshot is compressed using JPEG compression and wherein thecompression ratio is based on: a scale of the JPEG compression and aquality of the JPEG compression.
 16. The method of claim 10, furthercomprising: storing the compressed screenshot in a data repository;retrieving the compressed screenshot from the data repository; anddisplaying the compressed screenshot to a user.
 17. The method of claim10, wherein the accuracy score is highest upon the OCR text and the textprovided for the given screen entirely matching.
 18. A method fordetermining compression rates for images, the method comprising:obtaining, by a processing resource, a given image at least partiallycomprising a given text; compressing, by the processing resource, thegiven image at a given compression ratio, giving rise to a compressedimage; performing, by the processing resource, Optical CharacterRecognition (OCR) on the compressed image, giving rise to OCR text;comparing, by the processing resource, the OCR text to the given text,giving rise to comparison results; upon the comparison results meeting arule, increasing, by the processing resource, the given compressionrate; and upon the compression results not meeting a rule, returning, bythe processing resource, to a previous compression rate, if any.
 19. Anon-transitory computer readable storage medium having computer readableprogram code embodied therewith, the computer readable program code,executable by at least one processing resource of a computer to performa method comprising: obtaining, by the processing resource, a givenimage at least partially comprising a given text; compressing, by theprocessing resource, the given image at a given compression ratio,giving rise to a compressed image; performing, by the processingresource, Optical Character Recognition (OCR) on the compressed image,giving rise to OCR text; comparing, by the processing resource, the OCRtext to the given text, giving rise to comparison results; upon thecomparison results meeting a rule, increasing, by the processingresource, the given compression rate; and upon the compression resultsnot meeting a rule, returning, by the processing resource, to a previouscompression rate, if any.
 20. A non-transitory computer readable storagemedium having computer readable program code embodied therewith, thecomputer readable program code, executable by at least one processingresource of a computer to perform a method comprising: providing, by aprocessing resource, for each screen of one or more screens of anapplication: (a) text displayed on the respective screen, (b) acompression ratio associated with the respective screen, if any, and (c)a compression ratio determination status associated with the respectivescreen; receiving, by the processing resource, from a given deviceexecuting the application, a compressed screenshot of a given screen ofthe screens of the application, compressed in accordance with thecompression ratio associated with the given screen, or, upon nocompression ratio being associated with the given screen, in accordancewith a default compression ratio; and upon the provided compressionratio determination status of the given screen being indicative of anon-final compression ratio, performing the following by the processingresource: perform Optical Character Recognition (OCR), using OCRsoftware, on the compressed screenshot, giving rise to OCR text;determine an accuracy score by comparing the OCR text to the textprovided for the given screen; upon the accuracy score being below athreshold, set the compression ratio determination status of the givenscreen to be indicative of a final compression ratio; and upon theaccuracy score being equal to or above a threshold, increase thecompression ratio.